package com.yang.Seriver;

import com.yang.dao.UserDao;
import com.yang.entity.User;
import org.apache.commons.lang.RandomStringUtils;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.amqp.rabbit.core.RabbitMessagingTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.serializer.StringRedisSerializer;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;

/**
 * @Classname RegisterSeriver
 * @Description TODO
 * @Date 2020/11/11 19:13
 * @Created by yang
 */
@Service
public class UserService {
    @Autowired
    UserDao userDao;

    @Autowired
    RabbitMessagingTemplate rabbitMessagingTemplate;

    @Autowired
    RedisTemplate redisTemplate;

    public void save(User user){
        userDao.save(user);
    }

    public User findByNumber(String number) {
        return userDao.findByNumber(number);
    }

}
